<template>
  <div class="home">
    <!-- <van-button type="info">信息按钮</van-button>

    <van-button type="info" size="large">信息按钮</van-button> -->

    <van-button @click="login" 
                :loading="isLogin"  
                :loading-text="text"
                type="info">
      登录
    </van-button>
    <!-- loading-text="登录中"  -->
  </div>
</template>

<script>
export default {
  name: "Home",
  data() {
    return {
      text: "登录中",
      isLogin: false
    }
  },
  methods: {
    login() {
      this.isLogin = true
      setTimeout(() => {
        this.isLogin = false
      }, 1500)
    }
  }
};
</script>
